package com.yc.controller.utils;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author yc
 * @create 2022-01-25 20:51
 */
@RestControllerAdvice
public class ProjectExceptionAdvice {

    @ExceptionHandler
    public R doException(Exception exception) {
        exception.printStackTrace();
        return new R("服务器故障");
    }
}
